package com.aisoar.magicsoar.api.service.impl;
import com.aisoar.magicsoar.api.service.PlayBookExecuteService;
import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.LiteflowResponse;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class PlayBookExecuteServiceImpl implements PlayBookExecuteService {
    @Resource
    FlowExecutor flowExecutor;
    @Override
    public LiteflowResponse executeByChainId(String chainId) {
        LiteflowResponse response = flowExecutor.execute2Resp(chainId);
        log.info(response.getExecuteStepStr());
        return response;
    }
}
